import cv2

image = cv2.imread("images/image.jpg")

gray_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

sift_obj = cv2.SIFT_create()
keypoints = sift_obj.detect(gray_img, None)

img_with_keypoints = cv2.drawKeypoints(gray_img, keypoints, None, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

cv2.imwrite('images/sift_keypoints.jpg', img_with_keypoints)